<?php
/**
 * https://bugs.php.net/bug.php?id=71615
 */
$finfo = finfo_open(FILEINFO_MIME);

$files = [
	__FILE__, // ok
	'ok.php', // ok
	'readme.md', // this file is ok
    'another.markdown', // this file will throw out the notice: "Array to string conversion"
];

foreach ($files as $file) {
	var_dump(finfo_file($finfo, $file));
}

finfo_close($finfo);

?>